// Copyright 2017 guangbo. All rights reserved.

//服务配置，服务启动读取
//key: service:serviceName

package lib_config

// import (
// 	"gitee.com/goxiang2/server/lib/lib_watch"
// )

// //服务配置函数
// func GetServiceAllName(client *lib_watch.WatchClient) []string {
// 	return GetAllName(client, ServiceKey)
// }

// func GetServiceAllConfig(client *lib_watch.WatchClient, serviceName string) map[string]string {
// 	m := make(map[string]string)
// 	values := client.Hgetall(ServiceKey + serviceName)
// 	for i := 0; i < len(values); i = i + 2 {
// 		m[values[i]] = values[i+1]
// 	}
// 	return m
// }

// func SetServiceConfig(client *lib_watch.WatchClient, serviceName, key, value string) {
// 	client.Hset(ServiceKey+serviceName, key, value)
// }

// func GetServiceConfig(client *lib_watch.WatchClient, serviceName, key string) string {
// 	return client.Hget(ServiceKey+serviceName, key)
// }
